<?php
$_SERVER["DOCUMENT_ROOT"] = "/home/share/www/usbet11.us/secure";
include($_SERVER["DOCUMENT_ROOT"]."/db.inc.php");

$strSQL = "select MemID from `bet_BetList` where GambleID = 238 group by MemID";
if(!$RS = mysql_query($strSQL)){
	print mysql_error();
	exit();
}

$arrB1 = array();
while($Rows = mysql_fetch_object($RS)){
	$arrB1[$Rows -> MemID] = 1;
}

$strSQL = "select MemID from `bet_BetList` where GambleID in (237, 236, 235, 234) group by MemID";
if(!$RS = mysql_query($strSQL)){
	print mysql_error();
	exit();
}
$arrB2 = array();
while($Rows = mysql_fetch_object($RS)){
	$arrB2[$Rows -> MemID] = 1;
}

$arrMID = array();
foreach($arrB1 as $intMID => $intV){
	if($arrB2[$intMID] != 1){
		$arrMID[$intMID] = $intMID;
	}
}
/*foreach($arrB1 as $intBT => $arrT){
	foreach($arrT as $intMID => $intV){
		if($arrB2[$intBT][$intMID] != 1){
			$arrMID[$intMID] = $intMID;
		}
	}
}*/

print join(",\n", $arrMID);
?>